<template>
	<div class="panel panel-default">
          <div class="panel-heading">注册用户列表<span>Total :{{total}}</span></div>
          <div class="panel-body">
            
            <ul class="list-group">
              <li class="list-group-item" v-for="registor in registors">
                <span class="badge" @click="unreg(registor)">注销</span>
               {{registor.name}}
              </li>
                
            </ul>
          </div>
        </div>
</template>
<script>

import { mapGetters } from 'vuex';
 	export default{
		
		computed:{
			...mapGetters({
				registors:'registors',
				total:'total'
				}),
			additionalProps(){
				return "我是不属于Getter 的属性"
			}
		},
		methods:{
			unreg(registor){
				 
				this.$store.commit({
					type:'unregister',
					userId:registor.id
				})

			}
		}

	}

</script>